﻿using System.Collections.Generic;
using Wolfpack.Core.Configuration;
using Wolfpack.Core.Interfaces.Entities;
using Wolfpack.Core.Notification.Filters.Request;
using Wolfpack.Core;

namespace Wolfpack.Contrib.Checks.NuGet
{
    public class NuGetReleaseConfigurationDiscovery : HealthCheckDiscoveryBase<NuGetReleaseCheckConfig, NuGetReleaseCheck>
    {
        protected override NuGetReleaseCheckConfig GetConfiguration()
        {
            return new NuGetReleaseCheckConfig
                       {
                           Enabled = true,
                           Feed = NuGetReleaseCheck.OfficialFeedUrl,
                           FriendlyId = "CHANGEME!",
                           NotificationMode = SuccessOnlyNotificationFilter.FilterName,
                           Packages = new List<string>
                                          {
                                              "Wolfpack",
                                              "Wolfpack.Contrib.Checks.NuGet"
                                          }
                       };
        }

        protected override void Configure(ConfigurationEntry entry)
        {
            entry.Name = "NuGetReleaseCheck";
            entry.Description = "This check will alert you as soon as a new verion of a NuGet package is released.";
            entry.Tags.AddIfMissing("NuGet");
        }
    }
}